
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >

<meta http-equiv = "content-Type" content = "text/html" charset = "utf-8">
<head>
    <title>학부모 사용자 정보 등록</title>
</head>

<script language="javascript">
 
 function check_id(){

   window.open("check_id.php?Id=" + document.myForm.Id.value, "IDcheck",
        "width=270, height=130, scrollbars=no, resizable=yes");

 }
 
 function check_submit() {
         
         if (document.myForm.Id.value == "") {
                 alert('아이디를 입력하세요.');
                 document.myForm.name.focus();
                 return;
        
		} else if (document.myForm.PassWord.value == "") {
                 alert('비밀번호를 입력하세요.');
                 document.myForm.password.focus();
                 return;
                 
        } else if (document.myForm.ParentName.value == "") {
                 alert('학부모 성명을 입력하세요.');
                 document.myForm.subject.focus();
                 return;
                 
        } else if (document.myForm.ParentPhoneNumber.value == "") {
                 alert('학부모 전화번호를 입력하세요.');
                 document.myForm.memo.focus();
                 return;
  
        } else {
                 document.myForm.action = "inputDB.php";
                 document.myForm.submit();
        }
         
 }
 
</script>

<body>
<center>

<h2 align=center>사용자 정보 등록</h2><hr><br>
    
<form name=myForm method=post action="inputDB.php">

<table border=1 width=320 height=500>
    <tr>
	    <td witdh=20% align=center><b> 아이디 </b></td>
		<td> <center> <input type="text" size=10 maxlength=15 name='Id'> <input type=button value="중복확인" onClick="check_id()"></center> </td>
	</tr>

	<tr>
	    <td witdh=20% align=center><b> 비밀번호 </b></td>
		<td > <center> <input type="password" size=12 maxlength=25 name='PassWord'> </center> </td>
    </tr>

    <tr>
	    <td witdh=20% align=center><b> 학부모 성명 </b></td>
		<td> <center> <input type="text" size=12 maxlength=15 name='ParentName'> </center> </td>
    </tr>

    <tr>
	    <td witdh=20% align=center><b> 학부모 전화번호 </b></td>
		<td> <center> <input type="text" size=12 maxlength=15 name='ParentPhoneNumber'> </center> </td>
    </tr>

    <tr>
       <td align=center colspan=2>
	       <input type='button' value='입력하기' onclick='javascript:check_submit();'>
		   <input type=reset value="다시작성">
		   <input type="button" value="처음으로" onClick="history.go(-1)"> 
	   </td>
    </tr>

</table>

</form>
</center>
</body>
</html>